New Functions in Week 2

expression

{base}

Used in plots to add symbols to axes

sample

{base}

Takes a sample of the specified size

which

{base}

return indexes of TRUE entries of a logical vector

rnorm

{base}

Generate random numbers from a normal distribution

par

{graphics}

Set parameters of the plotting device

log

{base}

log (default base = e)

nobs

{gdata}

Compute the number of non-missing observations

ifelse

{base}

Return a or b depending on the value of test

lm

{base}

Fit a linear model

data.frame

{base}

Create a data.frame from vectors

subset

{base}

Return subsets of vectors, matrices or data frames which meet conditions.

as.data.frame

{base}

Functions to check if an object is a data frame, or coerce it if possible.

bar

{base}

Used for annotations, such as “expression(paste(”-“,bar(y)))”

as.character

{base}

Coerce a vector to character

The end!